package org.example.proxy;

import java.lang.reflect.Proxy;

public class JDKProxyTest {
    public static void main(String[] args) {
        JDKProxyAop proxyAop = new JDKProxyAop(new SumTarget());
        IStudent stu = (IStudent) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[]{IStudent.class}, proxyAop);
        System.out.println(stu.getClass());
        System.out.println(stu.getSum(10, 20));
    }
}
